package com.hmall.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.order.pojo.Order;
import org.apache.ibatis.annotations.Update;

public interface OrderMapper extends BaseMapper<Order> {
    @Update("update tb_order set status = 5 , close_time = now() where status = 1 and TIMESTAMPDIFF(MINUTE,create_time,DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%S'))>=120")
    void closeTimeoutOrder();
}
